<?php 
/**
 * 
 * !!!ATTENZIONE : le news non hanno ne menu ne padre quindi viene forzato via javascript la class active per il menu "NEWS"
 * 
 */

$lang = LANGUAGE_NONE;
//GESTIONE BUTTON SCOPRI
global $language;
$label_scopri = 'DISCOVER';
if($language->language == 'it'){
	$label_scopri = 'SCOPRI';	
}

switch ($view_mode) {
	case 'full':
	  menu_set_active_item('node/17');
	  $view_news = views_get_view('get_data_news');
	  $view_news->set_display('page');
	  $view_news->set_arguments(array($node->language));
	  $view_news->is_cacheable = FALSE;
	  $view_news->execute();
	  $data = $node->field_date[$lang][0]['value'];
	  $anno = date('Y', strtotime(strip_tags($data)));
	  $mese = date('m', strtotime(strip_tags($data)));
	  drupal_add_js('var anno = "'.$anno.'";
	  				 var mese = "'.$mese.'";
	  				',array('type' => 'inline'));
	  $menu_left = '';
	  if($view_news->result){
	  	$menu_left = $view_news->render();
	  }
?>		
<div class="corpo_centrale">
	<!-- LEFT -->
	<div class="left">
		<?php print $menu_left;?>
	</div>
	<!-- /LEFT -->
	
	<!-- RIGHT -->
	<div class="right">
		<div class="contenuto">
			<div class="paragrafo">
				<div class="back">
					<a href="<?php print $_SERVER['HTTP_REFERER']?>">
						back
					</a>
				</div>
				<div class="clear"></div>
				<!-- LISTA DELLE NEWS -->
				<div class="contenitore_lista_news">
					<!-- ELEMENTO NEWS -->
					<div class="news" id="news_1">
						<div class="titolo">
							<?php print render($content['field_date']);?>
						</div>
						<div class="clear"></div>
						<div class="corpo">
							<div class="testo">
								<?php print render($content['body']);?>												 																					
							</div>
							<div class="clear"></div>
						</div>
						<div class="clear"></div>										
					</div>
					<!-- /ELEMENTO NEWS -->
				</div>
				<!-- /LISTA DELLE NEWS -->
			</div>	
			<div class="clear"></div>
		</div>
	</div>
	<!-- /RIGHT -->
</div>
<!-- /CORPO CENTRALE -->
<?php 		
	break;
	case 'teaser':
?>
	 <div class="testo_news">
		<div class="titolo">
			<?php print $node->title;?>
		</div>
		<div class="clear"></div>
		<div class="descrizione">
			<?php print render($content['body']);?>
		</div>
	</div>
	<div class="scopri scopri_bianco">
		<a href="<?php print url('node/'.$node->nid);?>"><?php print $label_scopri; ?></a>
	</div>
<?php 		
	break;
	case 'search_result':
?>
<!-- ELEMENTO NEWS -->
<div class="news" id="news_1">
	<div class="titolo">
		<?php print render($content['field_date']);?> 
	</div>
	<div class="clear"></div>
	<div class="corpo">
		<div class="testo">
			<?php print render($content['body']);?>											 																					
		</div>
		<div class="scopri">
			<a href="<?php print url('node/'.$node->nid);?>"><?php print $label_scopri; ?></a>
		</div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>										
</div>
<!-- /ELEMENTO NEWS -->	
<?php 
	break;
}
?>